/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.synjones.pay.bank.wisedu.bean;

import com.synjones.pay.bank.wisedu.helper.WisPayHelper;
import com.synjones.pay.bank.wisedu.service.WisBankJumpImpl;
import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 * @author liubinqiang
 * @date 2017-5-20 14:00:29
 * @version V1.0
 * @desc 金智支付1.2.3 返回缴费结果信息
 */
public class WiseduPayReturnReqBean {

    private String sign;
    private String version;
    private String sysId;
    private String itemId;
    private String objId;
    private String otherId;
    private String objName;
    private String amount;
    private String paid;
    private String refund;
    private String overTime;
    private String status;
    private String projectId;
    private String payId;
    private String payPassword;
    private String specialValue;
    private String payType;

    public String genSign(String sysCert) {
        String firstSC = sysCert.charAt(0) + "";
        String[] signSource = new String[]{
            firstSC, version, firstSC, sysId, firstSC, itemId, firstSC, objId, firstSC, otherId,
            firstSC, objName, firstSC, amount, firstSC, paid, firstSC, refund, firstSC, overTime,
            firstSC, status, firstSC, projectId, firstSC, payId, firstSC, payPassword, firstSC, specialValue,
            firstSC, payType,
            sysCert
        };
        String sign = "";
        try {
            sign = WisPayHelper.createSignString(signSource);
        } catch (UnsupportedEncodingException ex) {
            Logger.getLogger(WisBankJumpImpl.class.getName()).log(Level.SEVERE, null, ex);
        } catch (NoSuchAlgorithmException ex) {
            Logger.getLogger(WisBankJumpImpl.class.getName()).log(Level.SEVERE, null, ex);
        }
        return sign;
    }

    /**
     * @return the sign
     */
    public String getSign() {
        return sign;
    }

    /**
     * @param sign the sign to set
     */
    public void setSign(String sign) {
        this.sign = sign;
    }

    /**
     * @return the version
     */
    public String getVersion() {
        return version;
    }

    /**
     * @param version the version to set
     */
    public void setVersion(String version) {
        this.version = version;
    }

    /**
     * @return the sysId
     */
    public String getSysId() {
        return sysId;
    }

    /**
     * @param sysId the sysId to set
     */
    public void setSysId(String sysId) {
        this.sysId = sysId;
    }

    /**
     * @return the itemId
     */
    public String getItemId() {
        return itemId;
    }

    /**
     * @param itemId the itemId to set
     */
    public void setItemId(String itemId) {
        this.itemId = itemId;
    }

    /**
     * @return the objId
     */
    public String getObjId() {
        return objId;
    }

    /**
     * @param objId the objId to set
     */
    public void setObjId(String objId) {
        this.objId = objId;
    }

    /**
     * @return the otherId
     */
    public String getOtherId() {
        return otherId;
    }

    /**
     * @param otherId the otherId to set
     */
    public void setOtherId(String otherId) {
        this.otherId = otherId;
    }

    /**
     * @return the objName
     */
    public String getObjName() {
        return objName;
    }

    /**
     * @param objName the objName to set
     */
    public void setObjName(String objName) {
        this.objName = objName;
    }

    /**
     * @return the amount
     */
    public String getAmount() {
        return amount;
    }

    /**
     * @param amount the amount to set
     */
    public void setAmount(String amount) {
        this.amount = amount;
    }

    /**
     * @return the paid
     */
    public String getPaid() {
        return paid;
    }

    /**
     * @param paid the paid to set
     */
    public void setPaid(String paid) {
        this.paid = paid;
    }

    /**
     * @return the refund
     */
    public String getRefund() {
        return refund;
    }

    /**
     * @param refund the refund to set
     */
    public void setRefund(String refund) {
        this.refund = refund;
    }

    /**
     * @return the overTime
     */
    public String getOverTime() {
        return overTime;
    }

    /**
     * @param overTime the overTime to set
     */
    public void setOverTime(String overTime) {
        this.overTime = overTime;
    }

    /**
     * @return the status
     */
    public String getStatus() {
        return status;
    }

    /**
     * @param status the status to set
     */
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * @return the projectId
     */
    public String getProjectId() {
        return projectId;
    }

    /**
     * @param projectId the projectId to set
     */
    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    /**
     * @return the payId
     */
    public String getPayId() {
        return payId;
    }

    /**
     * @param payId the payId to set
     */
    public void setPayId(String payId) {
        this.payId = payId;
    }

    /**
     * @return the payPassword
     */
    public String getPayPassword() {
        return payPassword;
    }

    /**
     * @param payPassword the payPassword to set
     */
    public void setPayPassword(String payPassword) {
        this.payPassword = payPassword;
    }

    /**
     * @return the specialValue
     */
    public String getSpecialValue() {
        return specialValue;
    }

    /**
     * @param specialValue the specialValue to set
     */
    public void setSpecialValue(String specialValue) {
        this.specialValue = specialValue;
    }

    /**
     * @return the payType
     */
    public String getPayType() {
        return payType;
    }

    /**
     * @param payType the payType to set
     */
    public void setPayType(String payType) {
        this.payType = payType;
    }

}
